//SPDX-FileCopyrightText: Copyright 2022-2024 深圳市同心圆网络有限公司
//SPDX-License-Identifier: GPL-3.0-only

package mail_dao

import "go.mongodb.org/mongo-driver/mongo"

var AccountDao *_AccountDao
var MailInfoDao *_MailInfoDao
var MailBodyDao *_MailBodyDao

func InitDao(mgoDb *mongo.Database) (err error) {
	AccountDao, err = newAccountDao(mgoDb)
	if err != nil {
		return
	}
	MailInfoDao, err = newMailInfoDao(mgoDb)
	if err != nil {
		return
	}
	MailBodyDao, err = newMailBodyDao(mgoDb)
	if err != nil {
		return
	}
	return
}
